package net.tavion.angelboot.gateway.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

import java.util.HashMap;
import java.util.Map;

@RestController
@Slf4j
public class HelloController {

    @GetMapping("/hello")
    public Mono<String> sayHi() {
        log.info("=======aaa==========");
        return Mono.just("Hi");
    }

    @PostMapping("/hellotoo")
    public Mono<Map> sayHiToo() {
        log.info("=======aaa2==========");
        Map map=new HashMap();
        map.put("exception",11);
        map.put("ab","2b");
        return Mono.just(map);
    }
}
